package com.agv.web.cxp;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;


import com.agv.core.dao.IGridPojoDao;
import com.agv.core.dao.cxp.ILigasDao;
import com.agv.core.dao.cxp.LigaCuatroCxpDaoImpl;
import com.agv.core.objectDomain.PropiedadesCampo;
import com.agv.core.util.GridPojo;
import com.agv.core.util.LigaPojo;

public class CxpDispatchAction extends DispatchAction {

	private IGridPojoDao facturasNotasDebitoDao;
	private ILigasDao LigaDosCxpDao;
	private ILigasDao LigaCuatroCxpDao;
	
	public void setFacturasNotasDebitoDao(IGridPojoDao facturasNotasDebitoDao) {
		this.facturasNotasDebitoDao = facturasNotasDebitoDao;
	}
	
	public void setLigaDosCxpDao(ILigasDao ligasFacturasDao) {
		this.LigaDosCxpDao = ligasFacturasDao;
	}
	
	public void setLigaCuatroCxpDao(ILigasDao ligaCuatroCxpDao) {
		LigaCuatroCxpDao = ligaCuatroCxpDao;
	}
	
	public ActionForward cfgOpFinancieras(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		//Se uso este action en calidad de mientras
		Object [] params = new Object [1];
		
	
		List<PropiedadesCampo> datos= LigaDosCxpDao.getDatosLiga(params);
		request.setAttribute("datosLigas", datos);
		
		
		return mapping.findForward("cfgOpFinancieras");
	}

	public ActionForward cfgTermPago(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		//Se uso este action en calidad de mientras
		Object [] params = new Object [1];
		
		
		List<PropiedadesCampo> datos = LigaCuatroCxpDao.getDatosLiga(params);
		request.setAttribute("datosLigas", datos);
		
		
		return mapping.findForward("cfgTermPago");
	}

	public ActionForward cfgClasifPago(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("cfgClasifPago");
	}

	public ActionForward cfgGenLinFactAutom(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("cfgGenLinFactAutom");
	}

	public ActionForward cfgCaptEmpleados(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("cfgCaptEmpleados");
	}

	public ActionForward cfgCheqBcaElec(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("cfgCheqBcaElec");
	}

	public ActionForward cfgCalContable(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("cfgCalContable");
	}

	public ActionForward cfgProveedores(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("cfgProveedores");
	}

	public ActionForward cfgSucProveedores(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("cfgSucProveedores");
	}

	public ActionForward cfgCompGastos(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("cfgCompGastos");
	}

	public ActionForward cfgNivAutorizacion(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("cfgNivAutorizacion");
	}

	public ActionForward cfgLimFirmaPers(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("cfgLimFirmaPers");
	}

	public ActionForward cfgJerAprobacion(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("cfgJerAprobacion");
	}

	public ActionForward cfgNivAntSaldosFact(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("cfgNivAntSaldosFact");
	}

	public ActionForward cfgCatProveedor(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("cfgCatProveedor");
	}

	public ActionForward cfgProgPagos(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("cfgProgPagos");
	}

	public ActionForward cfgParamPagosEsp(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("cfgParamPagosEsp");
	}

	public ActionForward cfgTarjCredito(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("cfgTarjCredito");
	}

	public ActionForward cfgTipProblema(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("cfgTipProblema");
	}

	public ActionForward capFactNotasDebProv(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		GridPojo pojo = new GridPojo();
		
		pojo = facturasNotasDebitoDao.findFirstGrid(new Object[]{1});

		request.setAttribute("griPojo", pojo);
		return mapping.findForward("capFactNotasDebProv");
		
	}

	public ActionForward capAntProv(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("capAntProv");
	}

	public ActionForward capIntElecCargaFactProv(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("capIntElecCargaFactProv");
	}

	public ActionForward capNotCrdProv(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("capNotCrdProv");
	}

	public ActionForward capCompGastos(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("capCompGastos");
	}

	public ActionForward capProgPagos(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("capProgPagos");
	}

	public ActionForward capPagoEspecie(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("capPagoEspecie");
	}

	public ActionForward prcProgPagos(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("prcProgPagos");
	}

	public ActionForward prcValFactProv(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("prcValFactProv");
	}

	public ActionForward prcCalPagComVendedores(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("prcCalPagComVendedores");
	}

	public ActionForward prcContFactProv(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("prcContFactProv");
	}

	public ActionForward prcEnvCorreosPagProv(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("prcEnvCorreosPagProv");
	}

	public ActionForward rptProveedores(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("rptProveedores");
	}

	public ActionForward rptTermPago(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("rptTermPago");
	}

	public ActionForward rptEstAnticipos(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptEstAnticipos");
	}

	public ActionForward rptConciliacion(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptConciliacion");
	}

	public ActionForward rptFactCapturadas(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptFactCapturadas");
	}

	public ActionForward rptFactRetenidas(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptFactRetenidas");
	}

	public ActionForward rptFactPagarProveedor(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptFactPagarProveedor");
	}

	public ActionForward rptDescProntoPago(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptDescProntoPago");
	}

	public ActionForward rptFactProveedores(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptFactProveedores");
	}

	public ActionForward rptCompSaldosCont(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptCompSaldosCont");
	}

	public ActionForward rptAntSaldosProv(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptAntSaldosProv");
	}

	public ActionForward rptPagosEspecie(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptPagosEspecie");
	}

	public ActionForward rptReqEfectivo(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("rptReqEfectivo");
	}

	public ActionForward rptPagoComVendedores(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptPagoComVendedores");
	}

	public ActionForward rptFactCanceladas(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return mapping.findForward("rptFactCanceladas");
	}

	
}
